package com.code.day18JiHe.DieDai;

import java.util.ArrayList;
import java.util.Iterator;

public class Demo01 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("雷无杰");
        list.add("王小虎");
        list.add("李寒衣");
        list.add("小龙女");
        Iterator<String> iterator = list.iterator();
        while(iterator.hasNext()){
//            获取
            String s =iterator.next();
            System.out.println(s);
        }
    }
}
